<?php

class User extends Eloquent {
    public static $table = 'jijaf_users';

    public function groups() {
        return $this->has_many_and_belongs_to('Group', 
            'jijaf_users_has_jijaf_groups');
    }

    public function set_password($password) {
        $this->set_attribute('password', Hash::make($password));
    }
}
